package com.itheima.controller;

import com.itheima.pojo.EmpJobCountData;
import com.itheima.pojo.Result;
import com.itheima.servise.EmpCountServise;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/report")
public class EmpCountController {
    @Autowired
    private EmpCountServise empCountServise;
    @GetMapping("/empJobData")
    public Result empJobData(){
        EmpJobCountData empJobCountData = empCountServise.countJob();

        return Result.success(empJobCountData);
    }


    @GetMapping("/empGenderData")
    public Result empGenderData(){
        List<Map> list = empCountServise.countGender();
        return Result.success(list);
    }
}
